package sk.project.accounting.data.model;

// Generated Dec 17, 2012 9:50:06 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * WarehouseReceipt generated by hbm2java
 */
@Entity
@Table(name = "warehouse_receipt", catalog = "skl_hosp_new")
public class WarehouseReceipt implements java.io.Serializable {

	private Integer id;
	private Date purchaseDate;
	private String billOfDelivery;
	private String invoiceNumber;
	private String active;
	private String status;
	private Date updated;
	private String slipNumber;
	private Set<CommodityMovement> commodityMovements = new HashSet<CommodityMovement>(
			0);
	private Set<WarehouseCommodity> warehouseCommodities = new HashSet<WarehouseCommodity>(
			0);

	public WarehouseReceipt() {
	}

	public WarehouseReceipt(Date purchaseDate, String billOfDelivery,
			String invoiceNumber, String active, String status, Date updated,
			String slipNumber, Set<CommodityMovement> commodityMovements,
			Set<WarehouseCommodity> warehouseCommodities) {
		this.purchaseDate = purchaseDate;
		this.billOfDelivery = billOfDelivery;
		this.invoiceNumber = invoiceNumber;
		this.active = active;
		this.status = status;
		this.updated = updated;
		this.slipNumber = slipNumber;
		this.commodityMovements = commodityMovements;
		this.warehouseCommodities = warehouseCommodities;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "purchase_date", length = 19)
	public Date getPurchaseDate() {
		return this.purchaseDate;
	}

	public void setPurchaseDate(Date purchaseDate) {
		this.purchaseDate = purchaseDate;
	}

	@Column(name = "bill_of_delivery")
	public String getBillOfDelivery() {
		return this.billOfDelivery;
	}

	public void setBillOfDelivery(String billOfDelivery) {
		this.billOfDelivery = billOfDelivery;
	}

	@Column(name = "invoice_number")
	public String getInvoiceNumber() {
		return this.invoiceNumber;
	}

	public void setInvoiceNumber(String invoiceNumber) {
		this.invoiceNumber = invoiceNumber;
	}

	@Column(name = "active", length = 5)
	public String getActive() {
		return this.active;
	}

	public void setActive(String active) {
		this.active = active;
	}

	@Column(name = "status")
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated", length = 19)
	public Date getUpdated() {
		return this.updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

	@Column(name = "slip_number")
	public String getSlipNumber() {
		return this.slipNumber;
	}

	public void setSlipNumber(String slipNumber) {
		this.slipNumber = slipNumber;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "warehouseReceipt")
	public Set<CommodityMovement> getCommodityMovements() {
		return this.commodityMovements;
	}

	public void setCommodityMovements(Set<CommodityMovement> commodityMovements) {
		this.commodityMovements = commodityMovements;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "warehouseReceipt")
	public Set<WarehouseCommodity> getWarehouseCommodities() {
		return this.warehouseCommodities;
	}

	public void setWarehouseCommodities(
			Set<WarehouseCommodity> warehouseCommodities) {
		this.warehouseCommodities = warehouseCommodities;
	}

}
